﻿<UserControl
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:Converter="clr-namespace:SkiTracker.Converter" xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"
    xmlns:maps="clr-namespace:Microsoft.Phone.Maps.Controls;assembly=Microsoft.Phone.Maps"
    xmlns:utiL="clr-namespace:SkiTracker.Controls"
    x:Class="SkiTracker.View.MapControlUserControl"
    mc:Ignorable="d" x:Name="Parent"
    d:DesignHeight="612" d:DesignWidth="446">
    
    <!--<UserControl.FontFamily>
        <StaticResource ResourceKey="PhoneFontFamilyNormal"/>
    </UserControl.FontFamily>
    <UserControl.FontSize>
        <StaticResource ResourceKey="PhoneFontSizeNormal"/>
    </UserControl.FontSize>
    <UserControl.Foreground>
        <StaticResource ResourceKey="PhoneForegroundBrush"/>
    </UserControl.Foreground>-->

    <Grid x:Name="LayoutRoot">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>


        <!--<maps:Map x:Name="Map"
                CartographicMode="{Binding SelectedMode.CartographicMode, Mode=TwoWay}"
                LandmarksEnabled="False"
                Pitch="{Binding Pitch, Mode=TwoWay}"
                Heading="{Binding Heading, Mode=TwoWay}" 
                Center="{Binding MapCenter, Mode=TwoWay}"
                ZoomLevel="{Binding ZoomLevel, Mode=TwoWay}" />-->

            <Slider VerticalAlignment="Top" 
                    Visibility="{Binding ShowHeadingSlider, Converter={StaticResource BooleanToVisibilityConverter}, ElementName=Parent}"
                    Opacity="0.5"
                    Margin="10 0 10 -40" 
                    Minimum ="-180" Maximum="180" 
                    Value="{Binding Heading, Mode=TwoWay}" Height="84" />
        <Grid Margin="10,0,0,10" Grid.Row="1">

            <Slider Opacity="0.5" 
            		Minimum ="0" Maximum="75" 
            		Value="{Binding Pitch, Mode=TwoWay}" 
            		Orientation="Vertical"
            		VerticalContentAlignment="Stretch" Margin="0,75,0,0" 
            		HorizontalAlignment="Right" Width="48" />


            <toolkit:ListPicker Grid.Column="0" 
            		Background="{Binding AccentColor, ConverterParameter=80, Converter={StaticResource ColorToBrushConverter}}"
            		ItemsSource="{Binding Modes}" 
            		SelectedItem="{Binding SelectedMode, Mode=TwoWay}" 
            		DisplayMemberPath="Name"
            		ExpansionMode="ExpansionAllowed"
            		FullModeHeader="Mode"
            		Width="120" HorizontalAlignment="Left" VerticalAlignment="Top" >
                <toolkit:ListPicker.FullModeItemTemplate>
                    <DataTemplate>
                        <TextBlock Text="{Binding Name}" FontSize="50" />
                    </DataTemplate>
                </toolkit:ListPicker.FullModeItemTemplate>
            </toolkit:ListPicker>

            <Grid Margin="0,20,22,0" Width="120" Height="55"
            		HorizontalAlignment="Right" VerticalAlignment="Top" utiL:GridUtilities.ColumnDefinitions="*, 10, *">

                <Button Content="+"  
            			Background="{Binding AccentColor, ConverterParameter=80, Converter={StaticResource ColorToBrushConverter}}"
            			Style="{StaticResource RoundButtonStyle}" 
            			Command="{Binding ZoomInCommand}"/>
                <Button Content="-" 
            			Grid.Column="2"
            			Background="{Binding AccentColor, ConverterParameter=80, Converter={StaticResource ColorToBrushConverter}}"
            			Style="{StaticResource RoundButtonStyle}"
            			Command="{Binding ZoomOutCommand}"/>

            </Grid>

        </Grid>

    </Grid>
</UserControl>